<!DOCTYPE html>
<html lang="zh-CN">

<head>
  <meta charset="UTF-8">
  <meta http-equiv="X-UA-Compatible" content="IE=edge">
  <meta name="viewport" content="width=device-width, initial-scale=1.0">
  <title>Document</title>
  <style>
    .box {
      text-align: center;
    }
  </style>
</head>

<body>
  <div class="box"></div>
  <script>
    function solveQuadraticEquation(a, b, c) {
      const discriminant = b ** 2 - 4 * a * c;
      if (discriminant < 0) {
        return "无实数解";
      } else if (discriminant === 0) {
        const x = -b / (2 * a);
        return `有一个重根：x=${x}`;
      } else {
        const x1 = (-b + Math.sqrt(discriminant)) / (2 * a);
        const x2 = (-b - Math.sqrt(discriminant)) / (2 * a);
        return `有两个不同的实根：x1=${x1}, x2=${x2}`;
      }
    }

  </script>
</body>

</html>